﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BA2009.Entities;
using BA2009.Data.DataAccess;

namespace BA2009.Services
{
    public class ResourceService : ServiceBase<Resource>, IResourceService
    {
        public ResourceService(IRepository<Resource> repository)
        {
            //if (repository == null)
            //    repository = new ResourceRepository();

            this.repository = repository;
        }

        //public ResourceService()
        //    : this(null)
        //{ }

        public IList<ResourceType> GetAllResourceTypes()
        {
             return new ValueNameRepository<ResourceType>().FindAll().ToList();
            
        }

        public IList<Banner> GetBanners()
        {
             return new BannerRepository().FindAll().ToList();
        }
    }
}
